#ifndef TEST_H
#define TEST_H
#include <QObject>
#include <QDebug>
#include <QMessageBox>
class Test : public QObject
{
    Q_OBJECT
public:
    explicit Test(QObject *parent = nullptr):QObject(parent){}

signals:
    //信号
    void Login(QString& accountNumber,QString& password,bool& flag);

public:
    bool flag;
    void LogIn()
    {
        QString a,p;
        a="123456789";
        p="123456789";
        emit Login(a,p,flag);
    }
    void Judge(){
        if(flag){
            QString s="登录成功\n";
            QMessageBox q("提示",s,QMessageBox::NoIcon,QMessageBox::Ok,QMessageBox::Cancel,QMessageBox::NoButton);
            q.exec();
            qDebug()<<"登录成功\n";
        }else{
            QString s="登录失败\n";
            QMessageBox q("提示",s,QMessageBox::NoIcon,QMessageBox::Ok,QMessageBox::Cancel,QMessageBox::NoButton);
            q.exec();
            qDebug()<<"账号或密码错误\n";
        }
    }

};

#endif // TEST_H
